package org.sixtythousand.joker;

import org.sixtythousand.joker.util.Callback;

/**
 * @author zhoulk
 * @date 2023/10/12 15:04
 * @desc
 */
public abstract class AbstractChannel implements JChannel {

    protected Callback readCallback;

    protected Connection connection;


    @Override
    public Callback readCallback() {
        return readCallback;
    }

    @Override
    public void addReadCallback(Callback readCallback) {
        this.readCallback = readCallback;
    }

    @Override
    public void setConnection(Connection connection) {
        this.connection = connection;
    }

    @Override
    public Connection getConnection() {
        return connection;
    }
}
